﻿@model Associativy.Administration.Models.AssociativyGraphPart

<fieldset>
    <legend>@T("Graph settings")</legend>
    <ol>
        <li>
            @Html.LabelFor(m => m.DisplayGraphName, T("Display graph name"))
            @Html.TextBoxFor(m => m.DisplayGraphName, new { @class = "text text medium" })
            @Html.ValidationMessageFor(m => m.DisplayGraphName)
        </li>
        <li>
            @Html.LabelFor(m => m.GraphName, T("Technical graph name"))
            @Html.TextBoxFor(m => m.GraphName, !String.IsNullOrEmpty(Model.GraphName) ? (object)new { @class = "text text medium", disabled = "disabled" } : new { @class = "text text medium" })
            @Html.ValidationMessageFor(m => m.GraphName)
            <span class="hint">@T("The technical name is used internally to identify the graph. Once set it can't be changed.")</span>
        </li>
        <li>
            <span class="hint">@T("Choose content types that will be contained by this graph:")</span>
            <ul>
            @for (int i = 0; i < Model.AllContentTypes.Count; i++)
            {
                <li>
                    @Html.HiddenFor(m => m.AllContentTypes[i].Name)
                    @Html.CheckBoxFor(m => m.AllContentTypes[i].IsContained)
                    <label for="@Html.FieldIdFor(m => m.AllContentTypes[i].IsContained)" class="forcheckbox">@Model.AllContentTypes[i].Name</label>
                </li>
            }
            </ul>
        </li>
    </ol>
</fieldset>